-
Notifications
You must be signed in to change notification settings - Fork 0
Схема grapqhl #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
schema.graphql
Outdated
| updateLesson(input: UpdateLessonInput!): Lesson! | ||
| removeLesson(id: ID!): Boolean! | ||
|
|
||
| createEducationSubject(input: CreateEducationSubjectInput!): Subject! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EducationSubject
| type LessonGroupByWeekDay { | ||
| weekDay: WeekDay! | ||
| lessons: [Lesson!]! | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У вас же расписание зависит от WeekDay и WeekType. Кажется тут группировка сломана.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, стремная группировка
| timeStart: Time! | ||
| timeEnd: Time! | ||
| weekDay: WeekDay! | ||
| weekType: WeekType! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
190-191 - довольно хрупкая хуйня, если в каком-то универе расписание не будет завязано на чётные - нечётные недели
В качестве альтернативы можно сделать ScheduleType - отдельный тип, который будет описывать правила составления расписания. Первым очевидно будет стандартный механизм, основанный на чётности-нечётности недели. Но можно будет добавить и другие варианты.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно наверное решить это новым типом недели "WeekType.REGULAR" - такие уроки будут проходить каждую неделю, независимо от чётности
No description provided.